package com.anmoyi.service.impl;

import com.anmoyi.model.dao.CustommassageMapper;
import com.anmoyi.model.dao.UsertemperMapper;
import com.anmoyi.model.po.Custommassage;
import com.anmoyi.model.po.Usertemper;
import com.anmoyi.service.UsertemperService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;

@Service
public class UsertemperServiceimpl implements UsertemperService {
    @Autowired
    private UsertemperMapper usertemperMapper;


    @Override
    public void addUsertemper(Usertemper usertemper) {
        usertemper.setCreateTime(new Date());

        usertemperMapper.insertSelective(usertemper);
    }

    @Override
    public void updateByPrimaryKeySelective(Usertemper usertemper) {

        usertemperMapper.updateByPrimaryKeySelective(usertemper);
    }

    @Override
    public void deleteByPrimaryKey(Integer id) {

        usertemperMapper.deleteByPrimaryKey(id);
    }

    @Override
    public List<Usertemper> selectByuserId(Integer id, String createTime) {

        return usertemperMapper.selectByuserId(id, createTime);
    }

    @Override
    public Usertemper selectlastByuserId(Integer id) {

        return usertemperMapper.selectlastByuserId(id);
    }

    @Override
    public void bindtemper(Integer userId, String deviceid) {
        usertemperMapper.bindtemper(userId, deviceid);
    }

    @Override
    public int selectbind(String deviceid, Integer userId) {
        return usertemperMapper.selectbind(deviceid, userId);
    }
    @Override
    public void devicebinduser(String deviceid, Integer userId) {
        usertemperMapper.devicebinduser(deviceid, userId);
    }

    @Override
    public List listbindtemper(Integer userId) {
        return usertemperMapper.listbindtemper(userId);
    }
    @Override
    public List listdevicebinduser(String deviceid) {
        return usertemperMapper.listdevicebinduser(deviceid);
    }
}
